Class NiceStack<T>
Assembly: RCaron.dll
View Source
Declarationcsharp
[Serializable]public class NiceStack<T>
Declarationcsharp
[Serializable]public class NiceStack<T>
Properties
Count
View Source
Declarationcsharp
public int Count { get; }
Declarationcsharp
public int Count { get; }
Methods
Clear()
View Source
Declarationcsharp
public void Clear()
Declarationcsharp
public void Clear()
Contains(T)
View Source
Declarationcsharp
public bool Contains(T item)
Declarationcsharp
public bool Contains(T item)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
<T> | item |
CopyTo(T[], int)
View Source
Declarationcsharp
public void CopyTo(T[] array, int arrayIndex)
Declarationcsharp
public void CopyTo(T[] array, int arrayIndex)
Parameters
Type | Name |
---|---|
<T>[] | array |
System.Int32 | arrayIndex |
TrimExcess()
View Source
Declarationcsharp
public void TrimExcess()
Declarationcsharp
public void TrimExcess()
Peek()
View Source
Declarationcsharp
public T Peek()
Declarationcsharp
public T Peek()
Returns
<T>
TryPeek(out T)
View Source
Declarationcsharp
public bool TryPeek(out T result)
Declarationcsharp
public bool TryPeek(out T result)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
<T> | result |
Pop()
View Source
Declarationcsharp
public T Pop()
Declarationcsharp
public T Pop()
Returns
<T>
TryPop(out T)
View Source
Declarationcsharp
public bool TryPop(out T result)
Declarationcsharp
public bool TryPop(out T result)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
<T> | result |
Push(T)
View Source
Declarationcsharp
public void Push(T item)
Declarationcsharp
public void Push(T item)
Parameters
Type | Name |
---|---|
<T> | item |
EnsureCapacity(int)
Ensures that the capacity of this Stack is at least the specified <code class="paramref">capacity</code>. If the current capacity of the Stack is less than specified <code class="paramref">capacity</code>, the capacity is increased by continuously twice current capacity until it is at least the specified <code class="paramref">capacity</code>.
View Source
Declarationcsharp
public int EnsureCapacity(int capacity)
Declarationcsharp
public int EnsureCapacity(int capacity)
Returns
System.Int32
: The new capacity of this stack.
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | capacity | The minimum capacity to ensure. |
ToArray()
View Source
Declarationcsharp
public T[] ToArray()
Declarationcsharp
public T[] ToArray()
Returns
<T>[]
At(Index)
View Source
Declarationcsharp
public T At(Index index)
Declarationcsharp
public T At(Index index)
Returns
<T>
Parameters
Type | Name |
---|---|
System.Index | index |
At(int)
View Source
Declarationcsharp
public T At(int index)
Declarationcsharp
public T At(int index)
Returns
<T>
Parameters
Type | Name |
---|---|
System.Int32 | index |
Extension Methods
- System.Object.RCaron.ListEx.Expect``1
- RCaron.ListEx.NotNull(object?)